from rest_framework import serializers
from guide.models import GuideDirection, GuideClassification, GuideDescription, GuideContent

# 急救指南序列化器
class GuideDirectionSerializer(serializers.ModelSerializer):
    class Meta:
        model = GuideDirection
        fields = [
            'id', 
            'name'
        ]

# 急救指南序列化器
class GuideClassificationSerializer(serializers.ModelSerializer):
    class Meta:
        model = GuideClassification
        fields = [
            'id', 
            'name',
            'guide_direction'
        ]

# 急救类别序列化器
class GuideDescriptionSerializer(serializers.ModelSerializer):
    class Meta:
        model = GuideDescription
        fields = [
            'id', 
            'name', 
            'guide_classification'
        ]

# 急救信息序列化器
class GuideContentSerializer(serializers.ModelSerializer):
    class Meta:
        model = GuideContent
        fields = [
            'id', 
            'title', 
            'time', 
            'author', 
            'text', 
            'references', 
            'video', 
            'image', 
            'recommend_home', 
            'guide_description'
        ]